{extend name="layouts@base" /}
{block name="head"}
<link rel="stylesheet" href="__STATIC__/mobile/default/css/userData.css" />
{/block}
{block name="main" }
<div class="page-bd userData">
    <!-- 页面内容-->
    <div class="cells">
   
        <div class="cell">
            <div class="cell_hd"><span class="fs28 color_3 fw_b">用户余额</span></div>
            <div class="cell_bd">
                <input type="number" class="fs28 fw_b color_3"  value="{$user_money}" disabled> 
            </div>
        </div>
        <div class="cell">
        	<div class="cell_hd"><span class="fs28 color_3 fw_b">用户ID</span></div>
            <div class="cell_bd">
                <input type="number" class="fs28 fw_b color_3" id="user_id" placeholder="请输入用户ID或手机号">
            </div>
        </div>
        <div class="cell">
        	<div class="cell_hd"><span class="fs28 color_3 fw_b">转赠金额</span></div>
            <div class="cell_bd">
                <input type="number" class="fs28 fw_b color_3" id="money" placeholder="请输入转赠金额">
            </div>
        </div>
        <div class="cell">
        	<div class="cell_hd"><span class="fs28 color_3 fw_b">支付密码</span></div>
            <div class="cell_bd">
                <input type="password" class="fs28 fw_b  color_3" id="password" placeholder="请输入新密码">
            </div>
        </div>
    </div>
    <div class="page-ftb">
        <span class="fs32 color_w fw_b BGcolor_r editpwd">确定</span>
    </div>
</div>


{/block}

{block name="footer"}
<script type="text/javascript">
	$('.editpwd').on('click',function(){
        var arr = new Object();
      	arr.user_id = $('#user_id').val();
        arr.money = $('#money').val();
		arr.password = $('#password').val();
        if (arr.user_id == '' ){
            _alert('请输入用户ID.');
            return false;
        }
		if (arr.money == '' ){
            _alert('请输入转赠金额.');
            return false;
        }
        if (arr.password == ''){
            _alert('请输入密码.');
            return false;
        }      
        jq_ajax('{:url("member/api.users/givemoney")}',arr,function (res) {
            if (res.code == 0) {
                _alert(res.msg);
                return false;
            }
            
            _alert(res.msg,'{:url("member/center/givemoney")}');
        })
    })
</script>

{/block}